
module.exports= function(){
    return {
        restrict: 'E',
        scope:{
            ngModel:'=',
            msrp:'=',
            sn:'=',
            cost:'='
        },
        template:'<div>\
                      <input type="text" placeholder="品牌" ng-model="ngModel.brand">\
                      <input type="text" placeholder="车型" ng-model="ngModel.model">\
                      <input type="text" placeholder="型号" ng-model="ngModel.version">\
                      <input type="text" placeholder="MSRP" ng-model="ngModel.msrp" ng-show="msrp">\
                      <input type="text" placeholder="SN" ng-model="ngModel.sn" ng-show="sn">\
                      <input type="text" placeholder="成本价" ng-model="ngModel.cost" ng-show="cost">\
                  </div>',
        replace: true,
        require: 'ngModel',
        link: function(scope, element, attrs, ngModelCtrl){
            //scope.ngModel = scope.ngModel || {};
        }
    }
};